#include"processbar.h"

const char Sign[4] = {'-','\\','|','/'};

void Show(const char* str,int n)
{
    usleep(10000);
    printf("[%-100s][%d%%][%c]\r",str,n,Sign[n%4]); 
    
    fflush(stdout);
}
void Processbar()
{
    char str[101] = {0};
    for(int i = 0;i < 101;++i)
    {
        Show(str,i);
        str[i] = STYLE;
    }
    printf("\n");
}


